package login

import (
	"9-13yk/common/proto/user"
	"9-13yk/service/server"
	"context"
)

type UserServer struct {
	user.UnimplementedUserServer
}

func (s UserServer) Login(ctx context.Context, req *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Login(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) ProductList(ctx context.Context, req *user.ProductListReq) (*user.ProductListResp, error) {
	login, err := server.ProductList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) SettlementAdd(ctx context.Context, req *user.SettlementAddReq) (*user.SettlementAddResp, error) {
	login, err := server.SettlementAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) OrderAdd(ctx context.Context, req *user.OrderAddReq) (*user.OrderAddResp, error) {
	login, err := server.OrderAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) PayCall(ctx context.Context, req *user.PayCallReq) (*user.PayCallResp, error) {
	login, err := server.PayCall(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) GetOrderList(ctx context.Context, req *user.GetOrderListReq) (*user.GetOrderListResp, error) {
	login, err := server.GetOrderList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) CouPonList(ctx context.Context, req *user.CouponListReq) (*user.CouponListResp, error) {
	login, err := server.CouPonList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) CouPonAdd(ctx context.Context, req *user.CouponAddReq) (*user.CouponAddResp, error) {
	login, err := server.CouPonAdd(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s UserServer) MyCouPonList(ctx context.Context, req *user.MyCouponListReq) (*user.MyCouponListResp, error) {
	login, err := server.MyCouPonList(req)
	if err != nil {
		return nil, err
	}
	return login, nil
}
